package com.yaodian100.ec.product.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.yaodian100.core.common.entity.BaseEntity;

/**
 * 虛擬商品主檔 (遊戲點數序號, 線上服務序號, ...), 不需實體物流遞送作業
 * */

@Entity
@Table(name = "EC_VIRTUAL_PRODUCT")
public class VirtualProduct extends BaseEntity {

	/**
	 * serial version
	 */
	private static final long serialVersionUID = -8967110275750222586L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_ec_virtual_product")
	@SequenceGenerator(name = "seq_ec_virtual_product", sequenceName = "SEQ_EC_VIRTUAL_PRODUCT")
	@Column(name = "VIRTUAL_PRODCUT_ID")
	private Long virtualProductId;

	@Column(name = "PRODUCT_ID", length = 8)
	private String productId;

	@Column(name = "VIRTUAL_PRODUCT_NAME", length = 40)
	private String virtualProductName;

	@Column(name = "VIRTUAL_PRODUCT_AMOUNT")
	private int virtualProductAmount;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "VIRTUAL_PRODUCT_STARTDATE")
	private Date virtualProductStartdate;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "VIRTUAL_PRODUCT_ENDDATE")
	private Date virtualProductEnddate;

	/**
	 * @return the virtualProductId
	 */
	public Long getVirtualProductId() {
		return virtualProductId;
	}

	/**
	 * @param virtualProductId the virtualProductId to set
	 */
	public void setVirtualProductId(Long virtualProductId) {
		this.virtualProductId = virtualProductId;
	}

	/**
	 * @return the productId
	 */
	public String getProductId() {
		return productId;
	}

	/**
	 * @param productId the productId to set
	 */
	public void setProductId(String productId) {
		this.productId = productId;
	}

	/**
	 * @return the virtualProductName
	 */
	public String getVirtualProductName() {
		return virtualProductName;
	}

	/**
	 * @param virtualProductName the virtualProductName to set
	 */
	public void setVirtualProductName(String virtualProductName) {
		this.virtualProductName = virtualProductName;
	}

	/**
	 * @return the virtualProductAmount
	 */
	public int getVirtualProductAmount() {
		return virtualProductAmount;
	}

	/**
	 * @param virtualProductAmount the virtualProductAmount to set
	 */
	public void setVirtualProductAmount(int virtualProductAmount) {
		this.virtualProductAmount = virtualProductAmount;
	}

	/**
	 * @return the virtualProductStartdate
	 */
	public Date getVirtualProductStartdate() {
		return virtualProductStartdate;
	}

	/**
	 * @param virtualProductStartdate the virtualProductStartdate to set
	 */
	public void setVirtualProductStartdate(Date virtualProductStartdate) {
		this.virtualProductStartdate = virtualProductStartdate;
	}

	/**
	 * @return the virtualProductEnddate
	 */
	public Date getVirtualProductEnddate() {
		return virtualProductEnddate;
	}

	/**
	 * @param virtualProductEnddate the virtualProductEnddate to set
	 */
	public void setVirtualProductEnddate(Date virtualProductEnddate) {
		this.virtualProductEnddate = virtualProductEnddate;
	}
}
